/**
 * Created by dength on 2017/04/06
 * @email 626097912@qq.com
 * 集成路由列表
 */
import Indexdemo          from '../pages/indexdemo';                    // 测试页面
import GrabTicket         from '../pages/grabTicket';                   //抢票主页
import OrderList          from '../pages/orderList';                    //订单列表
import TrainNumber        from '../pages/trainNumber';                  //备选车次
import ScheduledSuccess   from '../pages/scheduledSuccess';             //预定成功
import AdvanceBooking     from '../pages/advanceBooking';               //预定车票
import SelectUser         from '../pages/selectUser';                   //选择乘车人
import AddUser            from '../pages/addUser';                      //添加乘车人
import GtStart            from '../pages/gtStart';                      //抢票确认
import GtHalfway          from '../pages/gtHalfway';                    //抢票中
import DepartureStation   from '../pages/departureStation';             //选择出发站
import RtrainList         from '../pages/rtrainList';                   //当日选车次列表
import FixedSeat          from '../pages/fixedSeat';                    //确定座位
import DepartureDate      from '../pages/departureDate';                //出发日期
import TicketChanges      from '../pages/ticketChanges';                //改签
import TgExplain          from '../pages/tgExplain';                    //退改说明
import GqCodex            from '../pages/gqCodex';                      //改签规则
import ChangeReservation  from '../pages/changeReservation';            //更改预订


import {
  Navigator,
} from 'react-native';

let _navigator;

const routeMap = new Map();

//动画方式：FloatFromBottom,FloatFromRight

routeMap.set('Indexdemo', {
  component: Indexdemo,
  sceneAnimation: Navigator.SceneConfigs.FloatFromRight
});
routeMap.set('GrabTicket', {
  component: GrabTicket,
  sceneAnimation: Navigator.SceneConfigs.FloatFromRight
});
routeMap.set('OrderList', {
  component: OrderList,
  sceneAnimation: Navigator.SceneConfigs.FloatFromRight
});
routeMap.set('TrainNumber', {
  component: TrainNumber,
  sceneAnimation: Navigator.SceneConfigs.FloatFromRight
});
routeMap.set('ScheduledSuccess', {
  component: ScheduledSuccess,
  sceneAnimation: Navigator.SceneConfigs.FloatFromRight
});
routeMap.set('AdvanceBooking', {
  component: AdvanceBooking,
  sceneAnimation: Navigator.SceneConfigs.FloatFromRight
});
routeMap.set('SelectUser', {
  component: SelectUser,
  sceneAnimation: Navigator.SceneConfigs.FloatFromRight
});
routeMap.set('AddUser', {
  component: AddUser,
  sceneAnimation: Navigator.SceneConfigs.FloatFromBottom
});
routeMap.set('GtStart', {
  component: GtStart,
  sceneAnimation: Navigator.SceneConfigs.FloatFromRight
});
routeMap.set('GtHalfway', {
  component: GtHalfway,
  sceneAnimation: Navigator.SceneConfigs.FloatFromRight
});
routeMap.set('DepartureStation', {
  component: DepartureStation,
  sceneAnimation: Navigator.SceneConfigs.FloatFromBottom
});
routeMap.set('RtrainList', {
  component: RtrainList,
  sceneAnimation: Navigator.SceneConfigs.FloatFromBottom
});
routeMap.set('FixedSeat', {
  component: FixedSeat,
  sceneAnimation: Navigator.SceneConfigs.FloatFromRight
});
routeMap.set('DepartureDate', {
  component: DepartureDate,
  sceneAnimation: Navigator.SceneConfigs.FloatFromBottom
});
routeMap.set('TicketChanges', {
  component: TicketChanges,
  sceneAnimation: Navigator.SceneConfigs.FloatFromBottom
});
routeMap.set('TgExplain', {
  component: TgExplain,
  sceneAnimation: Navigator.SceneConfigs.FloatFromBottom
});
routeMap.set('GqCodex', {
  component: GqCodex,
  sceneAnimation: Navigator.SceneConfigs.FloatFromBottom
});
routeMap.set('ChangeReservation', {
  component: ChangeReservation,
  sceneAnimation: Navigator.SceneConfigs.FloatFromRight
});


export function registerNavigator(tempNavigator, replaceAllTheTime = false) {
  if (_navigator && !replaceAllTheTime) {
    return;
  }
  _navigator = tempNavigator;
}

export function getNavigator() {
  return _navigator;
}

export function getRouteMap() {
  return routeMap;
}
